package com.cheng.im.service.common.eunms;

/**
 * @author xiaoc
 * 系统返回码
 */
public enum ResultCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    USER_CACHE_EXPIRE(402, "用户缓存过期"),
    FORBIDDEN(403, "没有相关权限"),
    NOT_DATA(405, "未查找到对应数据"),
    REFRESH_TOKEN_EXCEPTION(406, "refresh-token异常"),
    ORDER_EXCEPTION(407, "order异常"),
    USERNAMEEXCEPTION(1040001, "账号不存在"),
    USERPASSWORDEXCETION(1040002, "密码不正确"),
    EXIST_PHONE(1040003, "此电话号码已经注册"),
    FORBIDDEN_ORG(105001, "你没有此组织相关的权限"),
    FORBIDDEN_ORG_NOT_BOX(105002, "此组织没有这个盒子"),
    OPERATE_DATA(106001, "操作数据不对，请你不要乱来"),
    NOT_REAGENT_DATA(106002, "没有这试剂"),
    NOT_BOX_DATA(106003, "没有这个盒子"),
    STRING_LONG(107001, "字符太长了，不要太多字，我不是你对象"),
    SYSEXCEPTION(999, "系统异常");
    private long code;
    private String message;

    private ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
